<template>
  <v-container fluid fill-height>
    <v-layout align-start>
      <v-row fill-height>
        <v-col cols="2">
          <v-list>
            <v-list-item
              v-for="item in sidebar"
              :key="item.title"
              :to="item.to"
              link
            >
              <v-list-item-title v-text="item.title" />
            </v-list-item>
          </v-list>
        </v-col>
        <v-col cols="10">
          <router-view />
        </v-col>
      </v-row>
    </v-layout>
  </v-container>
</template>
<script>
export default {
  data: () => ({
    drawer: true,
    sidebar: [
      {
        title: "课程主页",
        to: {
          name: "教师课程主页"
        }
      },
      {
        title: "课件管理",
        to: {
          name: "课件管理"
        }
      },
      {
        title: "直播教学",
        to: {
          name: "直播教学"
        }
      },
      {
        title: "问答讨论",
        to: {
          name: "问答讨论"
        }
      }
    ]
  }),
  created() {
    this.$store.commit("SET_TEACHER", true);
  }
};
</script>
